<#assign currentTime = .now>
package ${templateTable.packageName}.${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}.application.cqrs.command;

import com.neegix.application.command.ICommand;
import ${templateTable.packageName}.${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}.domain.entity.${templateTable.javaTableName}Entity;
import ${templateTable.packageName}.${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}.infrastructure.repository.convert.${templateTable.javaTableName}Converter;
import ${templateTable.packageName}.${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}.infrastructure.repository.mapper.${templateTable.javaTableName}Mapper;
import org.springframework.context.ApplicationContext;

 /**
  * This file is auto-generated by nebula-framework-generator.
  * The auto-generation plugin was developed using IntelliJ IDEA Community Edition.
  * Thanks to JetBrains for their outstanding contributions to the developer community.
  * <p>
  * The code generated by this tool is owned by the user of the tool.
  * The tool itself is copyrighted by <a href="${templateTable.copyright}">${templateTable.copyright}</a>.
  *
  * @author <a href="${templateTable.copyright}">${templateTable.copyright}</a>
  * @version ${templateTable.version}
  * @since ${currentTime?string("yyyy-MM-dd HH:mm:ss")}
  */

public class Update${templateTable.javaTableName}Command implements ICommand<Void> {
    private final ${templateTable.javaTableName}Entity ${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}Entity;

    public Update${templateTable.javaTableName}Command(${templateTable.javaTableName}Entity ${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}Entity) {
        this.${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}Entity = ${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}Entity;
    }

    @Override
    public Void execute(ApplicationContext context) {
        ${templateTable.javaTableName}Mapper ${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}Mapper = context.getBean(${templateTable.javaTableName}Mapper.class);
        ${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}Mapper.updateByPrimaryKey(${templateTable.javaTableName}Converter.INSTANCE.covertDO(${templateTable.javaTableName[0]?lower_case+templateTable.javaTableName[1..]}Entity));
        return null;
    }
}
